#include "Vector3D.h"

qreal Vector3D::length() const
{
	qreal len = 
		m_x * m_x +
		m_y * m_y +
		m_z * m_z;
	return qreal(std::sqrt(len));
}

qreal Vector3D::lengthSquared() const
{
	return 
		m_x * m_x +
		m_y * m_y +
		m_z * m_z;
}

qreal Vector3D::distanceToPoint(const Vector3D& point) const
{
	return (*this - point).length();
}